package com.software.loginregister.databasesHelper;

import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;

import com.software.loginregister.entity.room.WorksRoom;

import java.util.List;

@Dao
public interface WorksDao {
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    void insert(WorksRoom works);

    @Query("SELECT * FROM works")
    List<WorksRoom> getAllWorks();

    @Delete
    void delete(WorksRoom works);

    @Query("DELETE FROM works")
    void deleteAll();
}
